package cn.com.git.workflow.config.freemarker;

import cn.com.git.workflow.config.freemarker.tag.sys.SysDictTag;
import com.jagregory.shiro.freemarker.ShiroTags;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;

@Component
public class FreemarkerConfig implements InitializingBean {
    @Autowired
    private FreeMarkerConfigurer configuration;
    @Autowired
    private SysDictTag sysDictTag;

    @Override
    public void afterPropertiesSet() throws Exception {
        configuration.getConfiguration().setSharedVariable("sysDictTag", sysDictTag);
    }
}
